The present invention relates to computer graphics, and more particularly to interactive graphics systems such as home video game platforms. Still more particularly this invention relates to an improved texture tiling method and apparatus which uses indirect texture index maps to reference texture tiles in a tile definition map and map the texture tiles onto a rendered primitive. The invention further enables synthesized (blended) texture tiles to be created from a tile definitions map and mapped onto a primitive in a manner which prevents the appearance of repeating texture patterns.
Many of us have seen films containing remarkably realistic dinosaurs, aliens, animated toys and other fanciful creatures. Such animations are made possible by computer graphics. Using such techniques, a computer graphics artist can specify how each object should look and how it should change in appearance over time, and a computer then models the objects and displays them on a display such as your television or a computer screen. The computer takes care of performing the many tasks required to make sure that each part of the displayed image is colored and shaped just right based on the position and orientation of each object in a scene, the direction in which light seems to strike each object, the surface texture of each object, and other factors.
Because computer graphics generation is complex, computer-generated three-dimensional graphics just a few years ago were mostly limited to expensive specialized flight simulators, high-end graphics workstations and supercomputers. The public saw some of the images generated by these computer systems in movies and expensive television advertisements, but most of us couldn""t actually interact with the computers doing the graphics generation. All this has changed with the availability of relatively inexpensive 3D graphics platforms such as, for example, the Nintendo 64(copyright) and various 3D graphics cards now available for personal computers. It is now possible to interact with exciting 3D animations and simulations on relatively inexpensive computer graphics systems in your home or office.
A problem graphics system designers confronted in the past was how to create realistic looking surface detail on a rendered object without resorting to explicit modeling of the desired details with polygons or other geometric primitives. Although surface details can be simulated, for example, using myriad small triangles with interpolated shading between vertices, as the desired detail becomes finer and more intricate, explicit modeling with triangles or other primitives places high demands on the graphics system and becomes less practical. An alternative technique pioneered by E. Catmull and refined by J. F. Blinn and M. E. Newell is to xe2x80x9cmapxe2x80x9d an image, either digitized or synthesized, onto a surface. (See xe2x80x9cA Subdivision Algorithm for Computer Display of Curved Surfacesxe2x80x9d by E. Catmull, Ph.D. Thesis, Report UTEC-CSc-74-133, Computer Science Department, University of Utah, Salt Lake City, Utah., December 1994 and xe2x80x9cTexture and Reflection in Computer Generated Imagesxe2x80x9d by J. F. Blinn and M. E. Newell, CACM, 19(10), October 1976, 452-457). This approach is known as texture mapping (or pattern mapping) and the image is called a texture map (or simply referred to as a texture). Alternatively, the texture map may be defined by a procedure rather than an image.
Typically, the texture map is defined within a 2D rectangular coordinate space and parameterized using a pair of orthogonal texture coordinates such, as for example, (u, v) or (s, t). Individual elements within the texture map are often called texels. At each rendered pixel, selected texels are used either to substitute for or to scale one or more material properties of the rendered object surface. This process is often referred to as texture mapping or xe2x80x9ctexturing.xe2x80x9d
Most 3-D graphics rendering systems now include a texturing subsystem for retrieving textures from memory and mapping the textures onto a rendered object surface. A problem confronting graphics system designers is how to provide more sophisticated texture related effects such as xe2x80x9ctexture tilingxe2x80x9d in an efficient and advantageous manner. Texture tiling generally involves mapping textures in the form of texture tiles on a tile-by-tile basis onto a rendered object surface, such as a 2-D surface. A texture tile can be defined by a tile shaped portion of a texture stored in texture memory. An array or matrix of different tiles can be defined in texture memory. The size and shape of the tile can be selected to facilitate mapping of the tile onto a particular rendered surface. The tile size can vary and can be defined such that numerous tiles are required to cover a rendered surface. Once defined, texture tiles can be placed in specific locations over the rendered surface to create a textured surface.
This tiling effect has been achieved in the past by, for example, drawing a polygon for each desired tile. However, this technique can be expensive in terms of processing overhead and memory usage. In addition, a problem resulting from prior art tiling techniques is that the tiled surface can have a repeating pattern that can be visually perceived by the viewer. Repeating patterns result from the fact that there is generally a limited number of different texture tiles available to the programmer when tiling a surface. Thus, large surfaces, such as walls, floors, ground cover or the like, will use the same texture tiles numerous times in order to completely cover the surface. Such repeated use of the same tiles can detract from the realism of a rendered scene, due to the fact that, in many instances, the human eye can pick up on and see the repeating texture pattern resulting from the tiling process. A further problem confronting graphics systems designers is how to take advantage of indirect texturing processing to perform texture tiling operations. Thus, while significant work has been done in the past in connection with texture tiling, further improvements are possible and desirable.
The present invention solves this problem by providing techniques and arrangements that can be used to efficiently implement texture tiling in a graphics system. The present invention further enables more realistic texture tiled surfaces to be created that reduce or even eliminate the ability of a viewer of the displayed textured surface to notice any repeating patterns in the texture. The invention also enables pseudo-3D textures to be created by blending between textures tiles. The invention further enables indirect texture processing hardware to be used in an efficient and effective manner to achieve texture tiling.
In accordance with one aspect provided by the invention, the texture tiling method includes:
generating texture coordinates;
modifying the texture coordinates using an indirect tile index map;
using the modified texture coordinate to select a texture tile from a tile definitions map; and
displaying the selected texture tile.
In accordance with another aspect of the invention, the pseudo-3D tiling method includes:
defining a set of direct texture coordinates;
defining a set of indirect texture coordinates;
using the indirect texture coordinates to obtain an offset value;
combining the offset value with at least one of the direct texture coordinates to produce a first set of modified texture coordinates;
using the first set of modified texture coordinates to obtain a first texture tile from a tile definitions map
biasing the offset value;
modifying the direct texture coordinates using the biased offset value;
combining the modified offset value with at least one of the direct texture coordinates to produce a second set of modified texture coordinates;
using the second set of modified texture coordinates to obtain a second texture tile from the tile definitions map; and
blending the first texture tile and the second texture tile to produce a synthesized texture tile.